import request from '@/utils/request'

// 查询物料列表
export function listRecord() {
  return request({
    url: '/orders/request/listing',
    method: 'get',
  })
}



// 查询采购申请列表
export function listRequest(query) {
  return request({
    url: '/orders/request/list',
    method: 'get',
    params: query
  })
}

// 查询采购申请详细
export function getRequest(purchaseRequestNumber) {
  return request({
    url: '/orders/request/' + purchaseRequestNumber,
    method: 'get'
  })
}

// 新增采购申请
export function addRequest(data) {
  return request({
    url: '/orders/request',
    method: 'post',
    data: data
  })
}

// 修改采购申请
export function updateRequest(data) {
  return request({
    url: '/orders/request',
    method: 'put',
    data: data
  })
}

// 删除采购申请
export function delRequest(purchaseRequestNumber) {
  return request({
    url: '/orders/request/' + purchaseRequestNumber,
    method: 'delete'
  })
}
